<template>
  <div>
    <el-drawer title="面经预览" :visible.sync="drawer" :direction="direction" size="50%">
      <div class="detailContent">
        <h1>{{artical.stem}}</h1>
        <div v-html="artical.content" class="content"></div>
      </div>
    </el-drawer>
  </div>
</template>

<script>
import { detailArticalApi } from '@/api/list'
export default {
  name: 'ArticalDetail',
  props: {},
  components: {},
  data () {
    return {
      drawer: false,
      direction: 'rtl',
      artical: {}
    }
  },
  computed: {},
  watch: {},
  created () {},
  mounted () {},
  methods: {
    async  open (id) {
      this.drawer = true
      const { data } = await detailArticalApi(id)
      this.artical = data
    }
  }
}
</script>

<style lang="scss" scoped>
.detailContent {
  padding: 0 20px;
  h1 {
    border-bottom: 1px dotted #000;
    padding-bottom: 20px;
  }
}
</style>
